:host {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    font-size: 14px;
    white-space: nowrap;
    text-align: left;
    color: #ddd;
    cursor: pointer;
}

:host[focused] {
    color: #00a6ff;
}

:host[pressed] #togglebox:after {
    opacity: 0.7;
}

:host[pressed] #box {
    opacity: 0.7;
}

#icon {
    color: #00a6ff;
    opacity: 0;
    transition: opacity 0.1s ease;
    background: none;
}

#box {
    display: inline-block;
    box-sizing: border-box;
    width: 13px;
    height: 13px;
    min-width: 13px;
    min-height: 13px;
    border: 1px solid #000;
    font-size: 10px;
    text-align: center;
    background: #444;
    cursor: pointer;
}

#togglebox {
    display: none;
    position: relative;
    min-width: 4rem;
    min-height: 1.5rem;
    border-radius: 500rem;
}

#togglebox:before {
    position: absolute;
    content: '';
    width: 100%;
    height: 15px;
    background: #777;
    border-radius: 500rem;
    transition: background-color 0.5s ease;
}

#togglebox:after {
    position: absolute;
    content: '';
    width: 1.4rem;
    height: 1.4rem;
    background-color: #FFFFFF;
    border-radius: 500rem;
    left: 0rem;
    transition: left 0.3s ease;
    border: 1px solid #000;
    top: -2px;
}

.text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-indent: 5px;
}

:host[value] #togglebox:before {
    background: #818181;
}

:host[value] #togglebox:after {
    left: 2.5rem;
}

:host[value] #icon {
    opacity: 1;
}

#box:hover {
    border-color: #bababa;
}

:host[focused] #box {
    border: 1px solid #0c70a6;
}

:host[focused] #togglebox:after {
    border: 1px solid #0c70a6;
}

:host[disabled] {
    pointer-events: none;
    opacity: 0.5;
}

:host.toggle {
    line-height: 15px;
}

:host.toggle #box {
    display: none;
}

:host.toggle #togglebox {
    display: inline-block;
}